#ifndef NODE_H
#define NODE_H
#include <SDL.h>
#include <SDL_image.h>

namespace STG{

    enum itemType{
        life,
        shield,
        time
    };

    struct player
    {
        SDL_Texture*  texture = nullptr;
        SDL_FPoint position = {0,0};
        int width = 100;
        int height = 100;
        float speed = 300.0f;
        int hp = 3 ,maxHp = 3;
        Uint32 coolDown = 200;
        Uint32 lastShotTime = 0;
        bool isDead = false;
    };

    struct bulletPlayer{
        SDL_Texture*  texture = nullptr;
        SDL_FPoint position = {0,0};
        int width = 10;
        int height = 10;
        float speed = 400.0f;
        Uint32 damage = 1;
    };

    struct Enemy{
        SDL_Texture*  texture = nullptr;
        SDL_FPoint position = {0,0};
        int width = 10;
        int height = 10;
        int hp = 2;
        float speed = 300.0f;
        Uint32 coolDown = 1500;
        Uint32 lastShotTime = 0;
    };

    struct bulletEnemy{
        SDL_Texture*  texture = nullptr;
        SDL_FPoint position = {0,0};
        SDL_FPoint direction = {0,0};
        int width = 10;
        int height = 10;
        float speed = 200.0f;
        Uint32 damage = 1;
    };

    struct explosion{
        
        SDL_Texture*  texture = nullptr;
        SDL_FPoint position = {0,0};
        int width = 10;
        int height = 10;
        float scale = 2.0f;
        int currentTime = 0;
        int totlaFrame = 0;
        Uint32 startTime = 0;
        Uint32 FPS = 10;
    };

    struct item{
        SDL_Texture*  texture = nullptr;
        SDL_FPoint position = {0,0};
        SDL_FPoint direction = {0,0};
        int width = 0;
        int height = 0;
        float speed = 100.0f;
        int bounce = 3;
        itemType type = itemType::life; 
    };

    struct background{
        SDL_Texture*  texture = nullptr;
        SDL_FPoint position = {0,0};
        float offset = 0;
        int width = 0;
        int height = 0;
        float speed = 10000.0f;
    };
    
}

#endif